package com.cty.service.impl;

import com.cty.mapper.UsersMapper;
import com.cty.pojo.Users;
import com.cty.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: com.cty
 * @Date: 2020/3/23 16:28
 * @Description:
 * @version: 1.0
 */
@Service
public class UsersServiceImpl implements UsersService {

    @Autowired
    private UsersMapper usersMapper;

    @Override
    public void addOneUser(Users user) {
        this.usersMapper.insertUser(user);
    }

    @Override
    public List<Users> selectAllUser() {
        List<Users> users = this.usersMapper.selectUserAll();
        return users;
    }
}
